package com.example.mansystem.exception;

public enum CodeAndMsg {
    SUCCESS(1, "SUCCESS"),

    NOTLOGIN(10000,"未登录"),
    UNKNOW_USERNAME(10001,"不存在该用户"),
    ERROR_PASSWORD(10002,"用户密码错误"),
    USER_EXPIRED(10003,"session已过期"),
    USER_EXISTED(10004,"用户已存在"),
    Dto_Invalidate(10005,"传递参数错误"),
    DoesntHasApiPermission(10006,"没有操作权限"),
    AdminCantChange(10007,"不可更改管理员账号"),
    AdminRoleCantChange(10007,"不可更改超级管理员权限"),
    ErrorDeleteDepartment(10008,"不可删除根部门"),
    ErrorChangeDepartment(10009,"不可更改根部门"),
    InstrumentNotFound(10010,"未找到改仪器"),
    BatchRegisterErr(10011,"录入参数出错"),
    UNKNOWEXCEPTION(20000, "未知错误");

    private int code;
    private String msg;

    CodeAndMsg(int code, String msg){
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
